<template>
	<view class="container">
		<view class="list border-b" v-for="item in List" @click="NewsInfo(item.ID)">
			<view class="title">{{item.Title}}</view>
			<view class="context">{{item.Context}}</view>
		</view>
		<view class="loading">{{Tip}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				Tip:"加载中...",
				List:[]
			};
		},
		onLoad(options) {
			this.Find_News();
		},
		methods:{
			NewsInfo(ID){
				uni.navigateTo({
					url:'handle_news_info?ID='+ID
				})
			},
			Find_News(){
				var data = {};
				data.Act="Find_News";
				this.Util.Loading("加载中...");
				this.Util.Member(data, json=>{
					this.Util.HideLoading();
					this.List = json.Data.List;
					if(this.List.length==0){
						this.Tip="暂无数据";
					}
					if(this.List.length>0){
						this.Tip="没有更多了";
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	.container{padding-top:20rpx;}
	.loading{width:100%; padding-top:30px; text-align:center; color:#757575;}
	.list{width:100%; height: auto; padding:20rpx; background-color: #ffffff;
		.title{width:100%; max-height: 100rpx; line-height: 50rpx; font-size:34rpx; font-weight: bold; overflow: hidden;}
		.context{width:100%; max-height: 90rpx; line-height: 40rpx; font-size:30rpx; padding-top:10rpx; overflow: hidden; color:#6d6d6d;}
	}
	.list:active{background-color: #f6f4f4;}
</style>
